import React from 'react'
import { Image,Cell } from 'react-vant';
import {useNavigate} from 'react-router-dom'
import './index.css'
export default function My() {
  const navigate=useNavigate()
  const logout=()=>{
    localStorage.removeItem('token')
    localStorage.removeItem('user')
    navigate('/login')
  }
  return (
    <div>
        <p className='img'>
          <div><Image width='100' height='100' src=""/></div>
        </p>
        <p><Cell title='用户名' value={localStorage.getItem('user')} /></p>
        <p><Cell title='密码' value={localStorage.getItem('pasd')} /></p>
        <p className='btn'><button onClick={()=>logout()}>退出登录</button></p>
    </div>
  )
}
